﻿@model AuditWeb.Models.ProfileModel

@{
    ViewBag.Title =AuditResources.UI.PageTitle;
}

<h2>@AuditResources.Account.ObjectName<text>管理</text></h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@AuditResources.UI.Edit@AuditResources.Account.ObjectName</legend>
        <div class="editor-label">
            @AuditResources.Account.Username
        </div>
        <div class="editor-field">
            @Html.TextBox("Username",Model.Username,new {disabled="true"})
            @Html.ValidationMessageFor(model => model.Username)
        </div>
        <div class="editor-label">
            @AuditResources.Account.RoleName
        </div>
        <div class="editor-field">
            @foreach (string r in ViewBag.Roles)
            {

                    @Html.CheckBox(r, Model.Roles.SingleOrDefault(role => role.Equals(r)) != null ? true : false)@r
            }
            <span  class="field-validation-error">@ViewBag.RolesError</span>
        </div>
        <div class="editor-label">
            @AuditResources.Account.County
        </div>
        <div class="editor-field">
            @Html.DropDownList("CountyCode", string.Empty)
            @Html.ValidationMessageFor(model => model.CountyCode)
        </div>

        <div class="editor-label">
            @AuditResources.Account.RealName
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RealName)
            @Html.ValidationMessageFor(model => model.RealName)
        </div>

        <div class="editor-label">
            @AuditResources.Account.Telephone
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Telephone)
            @Html.ValidationMessageFor(model => model.Telephone)
        </div>

        <div class="editor-label">
            @AuditResources.Account.Subject
        </div>
        <div class="editor-field">
           @Html.DropDownList("SubjectId", string.Empty)
            @Html.ValidationMessageFor(model => model.SubjectId)
        </div>
    </fieldset>
    <div>
<input type="submit" value="@AuditResources.UI.Save" />|
    @Html.ActionLink(AuditResources.UI.BackToList, "UserList", null, new { @class = "button" })
</div>
}


